import request from '@/utils/request'

// 查询annualPlan列表
export function listAnnualPlan(query) {
    return request({
        url: '/training/annualPlan/list',
        method: 'get',
        params: query
    })
}
export function listTeam(query) {
    return request({
        url: '/dataview/teamList',
        method: 'get',
        params: query
    })
}
// 查询annualPlan详细
export function getAnnualPlan(id) {
    return request({
        url: '/training/annualPlan/' + id,
        method: 'get'
    })
}

// 查询自然年份集合
export function listNaturalYear(query) {
    return request({
        url: '/training/naturalYear/queryNaturalYearList',
        method: 'get',
        params: query
    })
}

// 查询自然年度目标，移动端请求地址
export function getNaturalYearDetails(id) {
    return request({
        url: '/app/annualPlan/getNaturalYearDetails?id=' + id,
        method: 'get'
    })
}

// 新增annualPlan
export function addAnnualPlan(data) {
    return request({
        url: '/training/annualPlan',
        method: 'post',
        data: data
    })
}

// 修改annualPlan
export function updateAnnualPlan(data) {
    return request({
        url: '/training/annualPlan',
        method: 'put',
        data: data
    })
}

// 删除annualPlan
export function delAnnualPlan(id) {
    return request({
        url: '/training/annualPlan/' + id,
        method: 'delete'
    })
}

// 导出annualPlan
export function exportAnnualPlan(query) {
    return request({
        url: '/training/annualPlan/export',
        method: 'get',
        params: query
    })
}